[ADI-3553] Clean up module if mmap error occured#13
Closed
HirakawaTakara wants to merge 4 commits intomainfrom
Closed
[ADI-3553] Clean up module if mmap error occured#13HirakawaTakara wants to merge 4 commits intomainfrom
HirakawaTakara wants to merge 4 commits intomainfrom
Conversation
EVP Python Application SDK coverage report
Python Application SDK test report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ryotabando
reviewed
Dec 10, 2025
src/libevp-agent/platform.c
Outdated
| if (fstat(fd, &sb) == -1) { | ||
| *error = errno; | ||
| xlog_error("%s: error on stat: %d", __func__, *error); | ||
| xlog_error("%s: error on stat %s(%d): %d", __func__, filename, |
Contributor
There was a problem hiding this comment.
If "*error" is "errno," please write it as "errno =".
Contributor
Author
There was a problem hiding this comment.
Thank you for confirming. I have adjusted the message to "errno=%d".
7a4b290
src/libevp-agent/platform.c
Outdated
| if (addr == MAP_FAILED) { | ||
| *error = errno; | ||
| xlog_error("%s: error on mmap: %d", __func__, errno); | ||
| xlog_error("%s: error on mmap %s(%d): %d, st_size=%zu", |
Contributor
There was a problem hiding this comment.
Please set it to "errno = %d".
Contributor
Author
There was a problem hiding this comment.
I have adjusted the message to "errno=%d".
7a4b290
src/libevp-agent/module_impl_obj.c
Outdated
| return EINVAL; | ||
| } | ||
| } else if (ret != ENOENT) { | ||
| /* Cleaned up the module if some IO error occurs. */ |
There was a problem hiding this comment.
Is Cleaned typo? I think Clean is correct because Cleaned is in the past tense.
Contributor
Author
There was a problem hiding this comment.
Thank you for confirming. I fixed the typo.
5b644f6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Clean up module if mmap error occured.
Why?
When an error occurs with mmap, the module information remains, so I added a call to
plat_mod_fs_file_unlink()to perform cleanup.